package com.derbysoft.dswitch.adapter.ihg.common.repository;

import com.derbysoft.dswitch.adapter.ihg.common.domain.HotelMapping;
import com.derbysoft.dswitch.adapter.ihg.common.domain.HotelStatus;
import com.derbysoft.dswitch.adapter.ihg.web.action.support.Paginater;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by: jason
 * Date: 2012-05-15
 */
public interface HotelRepository {
    Paginater paginater(HotelMapping hotelMapping, Paginater paginater);

    HotelMapping loadByHotelCode(String hotelCode);

    @Transactional(readOnly = false)
    void disableAll(List<HotelMapping> hotelMappings);

    HotelMapping loadByDerbyCode(String derbyCode);

    HotelMapping loadByHotelCode(String hotelCode,HotelStatus hotelStatus);

    HotelMapping load(Long id);

    HotelMapping save(HotelMapping perHotelMapping);

    @Transactional(readOnly = false)
    void saveAll(List<HotelMapping> hotelMappings);

    void delete(HotelMapping hotelMapping);
}
